<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link href="${ctxStatic }/mui/css/mui.min.css" rel="stylesheet" />
<link rel="stylesheet" href="${ctxStatic }/wx/css/AAcars.css" />
<style>
		body{
			background: #F5F5F5;
		}
		.mui-table-view{
			background: none;
		}
	</style>
<body>
		<div id="AAcars">
			<div class="mui-navbar-inner mui-bar mui-bar-nav" style="background: #16C59B;">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left" style="color: #fff;">
					<span class="mui-icon mui-icon-left-nav"  style="color: #fff;"></span>
				</button>
				<h1 class="mui-center mui-title" style="color: #fff;">拼车详情</h1>
			</div>
			<div class="mui-content">
			<div class="aacar_wrap">
                  <div class="aacar_banner" style="margin-top: 0;">
                  	  <img src="${shareProduct.linepic}" />
                  </div>
                  <div class="aacars_details">
                  	     <p class="aa_de_tit">${shareProduct.productname}</p>
                  	     <div class="reg_time">
                  	     	<span style="font-size: 12px;">${surplusTime}</span>
                  	     	<span>￥${shareProduct.avgprice}/人</span>
                  	     </div>
                  </div>
                  <div class="aacars_per">
                  	     <div class="aacars_head">
                  	     	<img src="${ctxStatic }/wx/img/day_img/headmy.png" />
                  	     </div>
                  	     <div class="head_name">
                  	     	  <p>${createManName}</p>
                  	     	  <p>${createDateStr}</p>
                  	     </div>
                  	     <div class="fight_groups">
                  	     	  <span class="ov_groups">${shareProduct.currentsell}人已拼</span>
                  	     	  <span class="open_groups">${shareProduct.minamount}人成团</span>
                  	     </div>
                  </div>
                  <c:if test="${shareProduct.sharetype==1}">
                  <div class="routeLInes">
                  	  <p class="route_tit">
                  	  	 <span class="route_ico">
                  	  	 	 <img src="${ctxStatic }/wx/img/day_img/xianlu@2x.png" />
                  	  	 </span>
                  	  	 <span class="route_hed">参考线路</span>
                  	  </p>
                  	  <div class="route_box">
                  	  	   <c:forEach items="${descriptions}" var="item"> 
								<p>第${item.key}天</p>
								<p>
									 <pre style="white-space: pre-wrap;">${item.value }</pre>
								</p>
								 </c:forEach>  
                  	  </div>         
                  </div>
                  </c:if>
               <div class="carpooling_box">
                  	      <div class="carpooling_tit">
                  	      	<span>
                  	      		<img src="${ctxStatic }/wx/img/day_img/xinxitianxie_atbc@2x.png" />
                  	      	</span>
                  	      	<span>拼车信息</span>
                  	      </div>
                  	  	   <p style="margin-top: 10px;">
                  	  	   	 <span>出行时间</span>
                  	  	   	 <span>${fromDateStr}</span>
                  	  	   </p>
                  	  	   <p>
                  	  	   	 <span>上车地点</span>
                  	  	   	 <span>${shareProduct.boardaddr}</span>
                  	  	   </p>
                  	  	   <!--<p>
                  	  	   	  <span>包车天数</span>
                  	  	   	  <span>${shareProduct.daysnum}天</span>
                  	  	   </p>-->
                  	  	   <p>
                  	  	   	  <span>使用车型</span>
                  	  	   	  <span>${shareProduct.tCargotype.typename}</span>
                  	  	   </p>
                  	  	   <p>
                  	  	   	  <span>服务车队</span>
                  	  	   	  <span>${shareProduct.office.abbr}</span>
                  	  	   </p>
                  	  	   <!--<p>
                  	  	   	  <span>特色服务</span>
                  	  	   	  <span><c:if test="${shareProduct.office.iswifi == '1' }">无线wifi</c:if>
							<c:if test="${shareProduct.office.powersupply == '1' }">车载充电</c:if>
							<c:if test="${shareProduct.office.tablewater == '1' }">免费饮用水</c:if>
							<c:if test="${shareProduct.office.businesssuit == '1' }">商务正装</c:if>
							<c:if test="${shareProduct.office.paper == '1' }">免费纸巾</c:if></span>
                  	  	   </p>-->
                  	  </div>
                  	  <!--<div class="detailed_il">
                  	  	   <div  class="detailed_il_tit">
                  	  	   	<span>
                  	  	   		<img src="${ctxStatic }/wx/img/day_img/xuzhi_atbc@2x.png" />
                  	  	   	</span>
                  	  	   	 <span>费用明细</span>
                  	  	   </div>
                  	  	   <p>${shareFee}</p>
                  	  </div>-->
                  	   <div class="detailed_il" style="padding-bottom: 60px;">
                  	  	   <div class="detailed_il_tit">
                  	  	   	<span>
                  	  	   		<img src="${ctxStatic }/wx/img/day_img/lianxiren_dingzhi@2x.png" />
                  	  	   	</span>
                  	  	   	 <span>拼车须知</span>
                  	  	   </div>
                  	  	   <div style="font-size:14px;">
 	   							${shareNotes}
 	   						</div>
                  	  </div>
			</div>
		   </div>
		   <c:if test="${shareProduct.status != '2' }">
		   <nav class="mui-bar mui-bar-tab aacars_box">
                <button id="btn">立即拼车</button>
		   </nav>
		   </c:if>
		   <c:if test="${shareProduct.status == '2' }">
		   <nav class="mui-bar mui-bar-tab aacars_box">
                <button id="btn" disabled="disabled">立即拼车</button>
		   </nav>
		   </c:if>
		</div>
		<script type="text/javascript" src="${ctxStatic }/zepto/zepto.min.js" ></script>
		<script src="${ctxStatic }/mui/js/mui.min.js"></script>
		<script type="text/javascript">
			mui.init();
			Zepto(function(){
				var mes = "${mes}";
				if(mes.length>0){
					mui.alert(mes,function(){
						window.history.back(-1);
					});
				};
				
					$('#btn').on('tap',function(){
						var href = "${ctxWx}/share/toShareBooking?sid=${shareProduct.sid}&avgprice=${shareProduct.avgprice}&minamount=${shareProduct.minamount}";
						if(isWeiXin()){ //微信打开
							//提交
							window.location.href = href;
						} else{
							href = "${ctxWx}/share/toShareBooking?sid=${shareProduct.sid}&avgprice=${shareProduct.avgprice}&minamount=${shareProduct.minamount}&type=notwx";
							window.location.href = href;
						}
					})
			})
			function isWeiXin(){ 
				var ua = window.navigator.userAgent.toLowerCase(); 
					if (ua.match(/MicroMessenger/i) == 'micromessenger') { 
						return true;
					} else { 
						return false;
					} 
			} 
		</script>
	</body>

</html>